<ion-header>
    <ion-toolbar content-page class="fir-toolbar">
        <ion-buttons start>
            <button ion-button icon-only (click)="backClickHandle($event)">
                <i class="toolbar-back"></i>
            </button>
        </ion-buttons>
        <ion-title>
            {{listType}}
        </ion-title>
        <ion-buttons end>
            <button ion-button icon-only adpmenutoggle>
                <i class="toolbar-menu"></i>
            </button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>

<ion-content>
    <!--下拉刷新-->
    <ion-refresher (ionRefresh)="doRefresh($event)" [pullMax]="800">
        <ion-refresher-content></ion-refresher-content>
    </ion-refresher>
    <div class="info-hd">
        <div class="search-bar">
            <input (keyup.Enter)="inputKeyUp($event)" [(ngModel)]="keyword"
                   type="text" placeholder="标题">
            <i (click)="searchHandle($event)"></i>
        </div>
        <button ion-button (click)="goToCollectionList()">收藏夹</button>
    </div>
    <!--消息列表-->
    <ion-list  [virtualScroll]="messageData" >
        <div *virtualItem="let item index as index" class="message-panel">
            <ion-item-sliding #slidingItem (click)="goToDetail(item.id,index)">
                <ion-item>
                    <p class="title-panel" [class.read]="item.readStatus"><span  *ngIf="previewLength>0&&index<=(previewLength-1)" class="preview">[预览]</span>{{item.title}}</p>
                    <p class="time-panel">
                        <span class="pulish-time">{{item.time?(item.time*1000|date:'yyyy/MM/dd HH:mm'):''}}</span>
                       <!-- <span class="msg-collect"></span>-->
                        <!--<img  class="msg-collect" src="./assets/images/information/collection_selected.png" alt="">
                        <img  class="msg-collect" src="./assets/images/information/Collection.png" alt="">-->
                    </p>
                    <i class="into-arrow"></i>
                </ion-item>
                <ion-item-options side="right" *ngIf="!(previewLength>0&&index<=(previewLength-1))">
                    <button ion-button (click)="deleteMessage($event,slidingItem,item.id)">
                        <i></i>
                    </button>
                </ion-item-options>
            </ion-item-sliding>
        </div>
    </ion-list>
    <div [class.adp-list-bottom-tip]="messageData.length>0" [class.adp-list-noData]="messageData.length==0">
        <span *ngIf="messageData.length>=6&&requestStatus">到底了</span>
    </div>
    <div *ngIf="messageData.length==0&&requestStatus" class="no-data">
        <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
        <div class="no-data-txt">没有相关数据</div>
    </div>
</ion-content>
